package com.muyu.system.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.muyu.system.domain.DmShoppingGoods;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 商品Mapper接口
 *
 * @author ruoyi
 * @date 2025-01-16
 */
public interface DmShoppingGoodsMapper extends BaseMapper<DmShoppingGoods> {
    /**
     * 查询商品
     *
     * @param id 商品主键
     * @return 商品
     */
    public DmShoppingGoods selectDmShoppingGoodsById(Long id);

    /**
     * 查询商品列表
     *
     * @param dmShoppingGoods 商品
     * @return 商品集合
     */
    IPage<DmShoppingGoods> selectDmShoppingGoodsList(IPage<DmShoppingGoods> page,@Param("dmShoppingGoods") DmShoppingGoods dmShoppingGoods);

    /**
     * 新增商品
     *
     * @param dmShoppingGoods 商品
     * @return 结果
     */
    public int insertDmShoppingGoods(DmShoppingGoods dmShoppingGoods);

    /**
     * 修改商品
     *
     * @param dmShoppingGoods 商品
     * @return 结果
     */
    public int updateDmShoppingGoods(DmShoppingGoods dmShoppingGoods);

    /**
     * 删除商品
     *
     * @param id 商品主键
     * @return 结果
     */
    public int deleteDmShoppingGoodsById(Long id);

    /**
     * 批量删除商品
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDmShoppingGoodsByIds(Long[] ids);

    List<DmShoppingGoods> selectShops(Long shopsId);

    List<DmShoppingGoods> selectStoreGoods(Long shopsId);


    List<DmShoppingGoods> selectGoodsId(@Param("longs") List<Long> longs);

}
